<%include file="include/head.html"%>
<div class="wrapper" id="main">
  <div id="div-home" class="main-info-box" style="min-width: <%$width+200%>px;min-height: <%$height%>px">
    <%include file="include/crumbs.html"%>
    <nav id="nav" class="second-level-nav">
      <ul>
	<%if $authorized || $user.open eq 'public'%>
	<li><a href="/tree/index?userid=<%$user.id%>">查看家谱</a></li>
	<li><a href="/users/album?userid=<%$user.id%>">查看相册</a></li>
	<%if $session.id == $user.creator && $user.state == RESOURCE_STATE_DELETED%>
        <li><a href="/users/restore?userid=<%$user.id%>">恢复</a></li>
	<%else%>
	<li><a href="/users/edit?userid=<%$user.id%>">编辑/纠错</a></li>
	<%/if%>
	<%/if%>
      </ul>
      <!--<%include file="include/left_ad.html"%>-->
    </nav>
    <div class="left" style="width: <%$width%>px;">
      <div id="family-tree" style="width: <%$width%>px;height: <%$height%>px">
	<%$tree%>
      </div>
      <%if $affiliate_file%>
      <div class="affiliate">
      <%include file=$affiliate_file%>
      </div>
      <%/if%>
    </div>
    <div class="clear"></div>
    <div id="msg1"></div>
    <br/>
    <div class="right">
      返回<a href="/surnames/show?surname=<%$surnameid%>"><%$surname%>氏家谱</a>
    </div>
    <div class="clear">
    </div>
  </div>
</div>
<%include file="include/bottom.html"%>
